fix(helm): add error when trying to scale controller with local SQLlite database#1144
Merged
EItanya merged 1 commit intokagent-dev:mainfrom Dec 2, 2025
Merged
Conversation
…te database Signed-off-by: Brian Fox <878612+onematchfox@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds validation to prevent users from configuring multiple controller replicas when using a local SQLite database, which would cause errors as API requests would be routed to replicas without the local state.
Key changes:
- Added a validation helper template that fails deployment when
controller.replicas > 1anddatabase.typeissqlite - Integrated the validation at the top of the controller deployment template
- Added comprehensive test coverage for both the failure case (replicas > 1 with sqlite) and the success case (replicas > 1 with postgres)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| helm/kagent/templates/_helpers.tpl | Adds kagent.validateController helper template with validation logic to prevent scaling issues with SQLite |
| helm/kagent/templates/controller-deployment.yaml | Includes the validation helper at the top of the deployment template to enforce the constraint |
| helm/kagent/tests/controller-deployment_test.yaml | Adds test cases to verify the validation fails appropriately for sqlite with multiple replicas and succeeds for postgres |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
EItanya
approved these changes
Dec 2, 2025
GTRekter
pushed a commit
to GTRekter/kagent
that referenced
this pull request
Dec 4, 2025
…te database (kagent-dev#1144) Running multiple controller replicas when using a local SQLite database will lead to errors as API requests will inevitably end up being handled by a replicas that does not have the local state (e.g. A2A session). This check/error hopefully prevents users from making this mistake. Split out from kagent-dev#1133 Signed-off-by: Brian Fox <878612+onematchfox@users.noreply.github.com> Signed-off-by: Ivan Porta <porta.ivan@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running multiple controller replicas when using a local SQLite database will lead to errors as API requests will inevitably end up being handled by a replicas that does not have the local state (e.g. A2A session). This check/error hopefully prevents users from making this mistake.
Split out from #1133